import unittest
from common.logging_use import init_log_config
from config import BASE_DIR
from scirpts.ihrm_emp_add_参数化 import TestEmpAddParams
from htmltestreport import HTMLTestReport
from scirpts.ihrm_login_test参数化 import TestIhrmLogin
import logging

# 初始化日志的配置信息
init_log_config(BASE_DIR + "/log/ihrm.log")

suite = unittest.TestSuite()

logging.info("测试套件实例,创建成功")

suite.addTest(unittest.makeSuite(TestEmpAddParams))
suite.addTest(unittest.makeSuite(TestIhrmLogin))

# runner = HTMLTestReport(BASE_DIR + "/report/ihrm.html") # 绝对路径
runner = HTMLTestReport("./report/ihrm.html", description="描述", title="标题")  # 相对路径

runner.run(suite)
logging.info("测试套件实例,创建成功")